<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.List"%>  
<%@page import="java.util.ArrayList"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.Locale"%>
<%@page import="com.sujeet.activity.tracker.model.Activity"%> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Activity Tracking</title>
</head>
<body>
	<H1>ACTIVITIES :-</H1>
	<br>
	<c:if test="${not empty activityList}">
		<table border="1" cellpadding="3" cellspacing="0" width="400">
		<tr>
	    	<th bgcolor="#2E9AFE">Id</th>
	    	<th bgcolor="#2E9AFE">Remaining Effort (PDs)</th>
	    	<th bgcolor="#2E9AFE">Start Date</th>
	    	<th bgcolor="#2E9AFE">Comment Log</th>
	    </tr>
	    <c:forEach var="activity" varStatus="status" items="${activityList}">	    	
	    	<tr>	    		
	        	<td><c:out value="${activity.id}"/></td>
	        	<td><c:out value="${activity.estimatedEffort}"/></td>
	        	<td><c:out value="${activity.startDate}"/></td>
	        	<td><c:out value="${activity.changeLog}"/></td>
	    	</tr>
	    </c:forEach>
	    </table>
    </c:if>
    <br>
    <H2>Add a new Activity</H2>
    	<FORM ACTION="/com.sujeet.activity.tracker.web/AddActivity.html" METHOD="get">			
			<INPUT TYPE="SUBMIT" VALUE="Add">
		</FORM>
		
	<H2>Delete an Activity</H2>
    	<FORM ACTION="/com.sujeet.activity.tracker.web/DeleteActivity" METHOD="get">
    		<INPUT TYPE="text" NAME="id" VALUE="">			
			<INPUT TYPE="SUBMIT" VALUE="Delete">
		</FORM>
		
	<H2>Modify an Activity</H2>
    	<FORM ACTION="/com.sujeet.activity.tracker.web/ModifyActivity" METHOD="get">
    		<INPUT TYPE="text" NAME="id" VALUE="">			
			<INPUT TYPE="SUBMIT" VALUE="Modify">
		</FORM>
</body>
</html>